﻿using BigEgg.Framework.Foundation;
using FMStudio.Documents.TemplateDocument.Properties;
using System.ComponentModel.DataAnnotations;
using System.Xml.Serialization;

namespace FMStudio.Documents.TemplateDocument.Models
{
    public class TemplateWizard : ValidationModel
    {
        #region Fields
        private string assembly = string.Empty;
        private string fullClassName = string.Empty;
        #endregion

        #region Properties
        [XmlElement(IsNullable = false, Order = 1)]
        [Required(
            ErrorMessageResourceName = "TemplateWizardAssemblyMandatory",
            ErrorMessageResourceType = typeof(Resources))]
        public string Assembly
        {
            get { return this.assembly; }
            set
            {
                if (this.assembly != value)
                {
                    this.assembly = value;
                    RaisePropertyChanged("Assembly");
                }
            }
        }

        [XmlElement(IsNullable = false, Order = 2)]
        [Required(
            ErrorMessageResourceName = "TemplateWizardFullClassNameMandatory",
            ErrorMessageResourceType = typeof(Resources))]
        public string FullClassName
        {
            get { return this.fullClassName; }
            set
            {
                if (this.fullClassName != value)
                {
                    this.fullClassName = value;
                    RaisePropertyChanged("FullClassName");
                }
            }
        }
        #endregion
    }
}
